<template>
	<view style="background-color: #f9fbf2;">
		<view>
			<cu-custom bgColor="bg-gradual-blue" :isBack="false">
				<block slot="content">发现</block>
			</cu-custom>
		</view>
		<view class="poster">
			<image :src="item" mode="widthFix" @tap="preview" :data-index="index" v-for="(item,index) in posterList"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				posterList: [
					'https://img.zcool.cn/community/019cb65d7a0995a8012060be96a347.png@1280w_1l_2o_100sh.png',
					'https://img.zcool.cn/community/01a0b75d7a0994a801211d5308bdab.png@1280w_1l_2o_100sh.png',
					'https://img.zcool.cn/community/01421b5d7a09a8a801211d532b860e.png@1280w_1l_2o_100sh.png',
					'https://img.zcool.cn/community/0104785d7a09ada8012060be886eba.png@1280w_1l_2o_100sh.png'
				]
			}
		},
		methods: {
			preview(e) {
				console.log(e.target.dataset.index)
				wx.previewImage({
					current: this.posterList[e.target.dataset.index],
					urls: this.posterList
				})
			}
		}
	}
</script>
<style>
	.poster {
		padding-bottom: 140rpx;
	}

	.poster image {
		width: 100%;
	}
</style>
